home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
comms
/
commo552.arj
/
SELECT.MAC
< prev
next >
Wrap
Text File
|
1993-10-14
|
5KB
|
184 lines
SELECT.MAC Macro to select files for uploading.
========== (called from COMMO.MAC)
by Fred Brucker; idea by Mark Scardina
{:start}
{setv dsksav,%_dsk}
{setv dirsav,%_dir}
{call del_send}
{:cur_dir}
{setv drive,%_dsk}
{setv path,%_dir}
{comp uldir}
{ifco nouldir}
{setv path,%uldir}
{inst %uldir,:}
{comp _pos,2}
{ifco ,nodrive}
{subs drive,1,2,%uldir}
{subs path,3,66,%uldir}
{:nouldir}
{call chk_path}
{:nodrive}
{file %drive%%path\*.*}
{ifco dirok}
{info-q ULDIR is not a valid directory. Change it?}
{ifco ,exit}
{input uldir,Enter new upload directory (no "\" at end)}
{goto cur_dir}
{:dirok}
{exec-n %drive}
{comp path}
{ifco root}
{exec-n cd %path}
{goto topmenu}
{:root}
{exec-n cd \}
{:topmenu}
{file %drive%%path\*.*}
{setv x,1}
{setv endflag,0}
{:f_loop}
{leng %_ffn}
{setv padlen,12}
{decr padlen,%_len}
{subs pad,1,%padlen, }
{setv temp,%_ffn%%pad}
{leng %_ffs}
{setv padlen,9}
{decr padlen,%_len}
{subs pad,1,%padlen, }
{setv temp,%temp%%pad%%_ffs}
{setv temp,%temp %_ffd %_fft}
{setv menu%x,%temp}
{setv xl,%x}
{incr x}
{file-x}
{ifco ,no_more}
{comp x,10}
{ifco ,f_loop}
{:msetup}
{setv menu11, [N] Next page [Enter] to start upload}
{:lsetup}
{setv x,1}
{:m_loop}
{comp menu%x}
{ifco disp_menu}
{setv-s temp,menu%x}
{setv _menu%x, %x% ■ %temp}
{incr x}
{comp x,11}
{ifco ,m_loop}
{:disp_menu}
{setv _menu11,%menu11}
{setv _menu12, [T] Top of directory [M] Manual entry}
{setv _menu13, [W] vieW/edit send list [V] change driVe}
{setv _menu15, "\.." = parent directory "\xxxxx" = subdirectory}
{setv _menter,done}
{setv _mlabel,s,s,s,s,s,s,s,s,s,,,,manual,next,,,,,,topmenu,,drive,view,done}
{setv _mcolor,%mcolor}
{window-k}
{menu 19,60,Selecting files from: %drive%%path\}
{setv file}
{call del_send}
{goto exit}
{:next}
{comp endflag,1}
{ifco end_disp}
{setv x,1}
{goto f_loop}
{:no_more}
{call clrmenu}
{setv menu11, ** LAST PAGE ** [Enter] to start upload}
{setv endflag,1}
{goto lsetup}
{:end_disp}
{setv endflag,0}
{goto topmenu}
{:s}
{comp _msn,%xl}
{ifco-g lsetup}
{setv-s temp,menu%_msn}
{inst temp,\}
{comp _pos,1}
{ifco ,is_file}
{subs temp,2,8,%temp}
{exec-n cd %temp}
{setv path,%_dir}
{call chk_path}
{goto topmenu}
{:is_file}
{comp temp}
{ifco msetup}
{inst temp, }
{subs temp,1,%_pos,%temp}
{wopen-a %_hom%^(send^).lst}
{write %drive%%path%\%temp}
{wclose}
{goto lsetup}
{:done}
{setv file,@%_hom%^(send^).lst}
{:exit}
{call cleanup}
{macload %_mac,%m_call}
{:cleanup}
{exec-n %dsksav}
{exec-n cd %dirsav}
{setv x,1}
{call clrmenu}
{setv endflag} {setv dsksav} {setv dirsav} {setv temp} {setv drive}
{setv path} {setv x} {setv xl} {setv pad} {setv padlen}
{wind-k0}
{return}
{:clrmenu}
{setv menu%x,}
{incr x}
{comp x,12}
{ifco ,clrmenu}
{return}
{:chk_path}
{leng %path}
{comp _len,1}
{ifco ,not_root}
{setv path}
{:not_root}
{return}
{:del_send}
{ifex %_hom%^(send^).lst,,no_lst}
{exec-n del %_hom%^(send^).lst}
{:no_lst}
{return}
{:view}
{edit %_hom%^(send^).lst}
{goto lsetup}
{:drive}
{wind-k0}
{setv temp,%drive}
{sete-p0 esc_off}
{input temp,Enter new drive letter}
{setesc}
{comp temp}
{ifco lsetup}
{subs temp,1,1,%temp}
{setv drive,%temp:}
{exec-n %drive}
{setv path,%_dir}
{call chk_path}
{goto topmenu}
{:manual}
{wind-k0}
{sete-p0 esc_off}
{setv temp,%uldir\}
{input temp,Enter a filename to UPLOAD}
{comp temp} {ifco esc_off}
{wopen-a %_hom%^(send^).lst}
{write %temp}
{wclose}
{:esc_off}
{setesc}
{goto lsetup}
- end -